function getCount(number, max) {
    var a = [1, 2, 5, 10, 20, 50, 100, 200];
    if(max==0) return 1;
    var sum=1;
    max = max || a.length-1;
    for(var i=max; i>0; i--) {
        if(number<a[i]) continue;
        for(var j=1; j<=Math.floor(number/a[i]); j++) {
            sum += getCount(number - a[i]*j, i-1);
        }
    }
    return sum;
    
}

function pe31() {
    return getCount(200);
}

print(pe31());
